Fix broken docs jobs and update-client script#2498
Fix broken docs jobs and update-client script#2498stephenfin wants to merge 7 commits intokubernetes-client:masterfrom
Conversation
These have not built successfully for a long-time (over two years [1] at time of writing). We should work to re-add these but lets focus on getting out openapi-generator version bumped first. [1] https://app.readthedocs.org/projects/kubernetes/builds/ Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Update examples that were moved in kubernetes-client#938 and fix title underlines (docutils cares about this stuff). Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Remove Python 2 stuff as well as unused or commented out configuration values. Also add sphinx to the dependencies Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Use more recent Python versions and remove use of the build_sphinx distutils command which hasn't existed for many years now. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: stephenfin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Python 3.13 is the latest and greatest. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We will subsequently overlay our own commits on this. We also stop setting OPENAPI_GENERATOR_COMMIT: this is already being set by the 'openapi/python.sh' from 'kubernetes-client/gen' so setting it here is very misleading. With this change, any user should now be able to run e.g.: USERNAME=kubernetes CLIENT_ROOT=../kubernetes ./scripts/update-client.sh and see zero changes (assuming kubernetes/kubernetes is in fact cloned to the parent directory). Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
cd87cd5 to
a7008b0
Compare
This was replacing the wrong method. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
/assign |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
roycaihw
left a comment
There was a problem hiding this comment.
Thanks for driving this! Some minor comments and otherwise LGTM. I suggest keeping this PR focused on doc changes.
| @@ -1,8 +1,3 @@ | |||
| .. kubernetes-python-client documentation master file, created by | |||
There was a problem hiding this comment.
Doc built failed with
No default configuration file found at repository's root. See https://docs.readthedocs.io/en/stable/config-file/
And the documentation has been stale since v28: https://kubernetes.readthedocs.io/en/latest/README.html#documentation
I'm okay with dropping the documentation for now but we should aim for fixing the doc after we bump the code generator version, ideally before the next release cut.
| set -o pipefail | ||
|
|
||
| # The openapi-generator version used by this client | ||
| export OPENAPI_GENERATOR_COMMIT="v4.3.0" |
There was a problem hiding this comment.
Could you make this change in #2499? Let's keep this PR focus on doc changes.
| # This is a hack: openapi-generator shouldn't be producing syntactically | ||
| # incorrect tests | ||
| echo ">>> Removing broken tests" | ||
| git clean -fd -- kubernetes/test/ |
There was a problem hiding this comment.
Similar here. Could you make this change in #2499? Let's keep this PR focus on doc changes.
| {[testenv:coverage]commands} | ||
| python -m coverage xml | ||
|
|
||
| [testenv:update-pycodestyle] |
There was a problem hiding this comment.
I noticed that pycodestyle was removed. Was it replaced by a different tool?
| @@ -1,26 +1,37 @@ | |||
| [tox] | |||
| envlist = | |||
| py3{6,7,8,9} | |||
| @@ -0,0 +1,188 @@ | |||
| diff --git a/kubernetes/client/api/custom_objects_api.py b/kubernetes/client/api/custom_objects_api.py | |||
There was a problem hiding this comment.
This replaces apply-hotfixes.sh, but it's not yet cleaned up here
Line 214 in 9a8be12
I'd suggest doing this replacement (and the cleanup) in a separate PR.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
While working on #2496 and #2497, I noticed that running the
update-client.shscript generated some unexpected changes to files. Upon further inspection, it appears files and hunks were the result of previous PRs that should have instead been applies as patches to the client (via theupdate-client.shscript).In addition, I also noticed that docs builds were returning a lot of errors, mainly because the generator is generating syntactically invalid reStructuredText docstrings. This has led to a long-term failure to build the docs.
I resolve all issues in this PR via a series of commits that do the following:
pydocto explore the API until then.toxagainupdate-client.shso that we layer on required changesThis should set us up nicely for a future PR that will update
openapi-generatorto a less ancient version. I am working on this currently.Which issue(s) this PR fixes:
Special notes for your reviewer:
I don't know why the maintainers aren't seeing these issues locally: perhaps they are and have local tooling to help workaround them. In any case, I would encourage you to go through this PR commit by commit and to feel free to drop anything that doesn't make sense.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: